$RECODE = "NO"; #"NO"; -- dont use recode, it is not widely available
# Directories
$prefix="/c/gcdev/gnucash-2.6.5a/gwenhywfar";
$datadir="${prefix}/share";
$pkgdatadir="$datadir/ktoblzcheck";
$BANKDATADIR="${pkgdatadir}";
## Sanity checks
die "Neither wget nor lynx is available on your system, or was available on the system where the installed rpm was built. This tool requires wget or lynx. If you have it i
nstalled, then edit the script and set the variable WGET or LYNX to the full path to wget or lynx. Aborting for now."
if $WGET eq "NO" and $LYNX eq "NO";
#die "sed or grep is not available on your system. This tool requires it. Aborting."
# if $SED eq "NO" || $GREP eq "NO";
die "The directory for the bankdata \"$BANKDATADIR\" does not exist. Aborting."
if ! -d $BANKDATADIR;
die "The directory for the bankdata \"$BANKDATADIR\" is not writable. You need to run this script as the user who owns that directory. This probably means you must run this script as root! However this script will not write anything anywhere until it tells you so and you confirm it."
if ! -w $BANKDATADIR;
#print "The recode program is not available. This is okay as long as your system default encoding is latin1/ISO-8859-1 or similar. However if your system default encoding is UTF-8 then the conversion of the downloaded file will fail. In that case please cancel now, edit this script and set the variable RECODE to the full path to recode.\n"
# if $RECODE eq "NO";
## Common constants
$debug=0; # set this to nonzero for activating debugging mode